import Vue from 'vue'
import Router from 'vue-router'
import Login from "../views/LoginAndSetting/Login";
import Setting from "../views/LoginAndSetting/Setting";
import Home from "../views/home";

import UserManage from "../views/UserManage.vue";
import ChargingStationManage from "../views/ChargingStationManage.vue";
import FixManage from "../views/FixManage.vue";
import NoticeManage from "../views/NoticeManage.vue";
import OrderManage from "../views/OrderManage.vue";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'Login',
      component: Login,
      meta: {
        title: '登陆'
      }
    },
    {
      path: '/setting',
      name: 'Setting',
      component: Setting,
      meta: {
        title: '设置'
      }
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      meta: {
        title: '首页'
      }
    },

    {
      path: '/userManage',
      name: 'UserManage',
      component: UserManage,
      meta: {
        title: '用户管理'
      }
    },
    {
      path: '/chargingStationManage',
      name: 'ChargingStationManage',
      component: ChargingStationManage,
      meta: {
        title: '充电桩管理'
      }
    },
    {
      path: '/orderManage',
      name: 'OrderManage',
      component: OrderManage,
      meta: {
        title: '订单管理'
      }
    },
    {
      path: '/fixManage',
      name: 'FixManage',
      component: FixManage,
      meta: {
        title: '报修管理'
      }
    },
    {
      path: '/noticeManage',
      name: 'NoticeManage',
      component: NoticeManage,
      meta: {
        title: '公告管理'
      }
    }
  ]
})
